package com.sca.service.factor;

import com.sca.service.RemoteProviderService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;


/*
 * @param
 * 运行出错的时消息打印
 */
@Component
public class ProviderFallbackFactor implements FallbackFactory<RemoteProviderService> {


    @Override
    public RemoteProviderService create(Throwable throwable) {

        return (msg)->{
                    return "服务器异常，请检查后输入";
                };
        };

}
